<%@ page language="java" import="java.util.*" import="javax.servlet.http.Cookie"%>

<link rel="stylesheet" type="text/css" media="screen" charset="utf-8" href="css/common.css" />

<%@ include file = "header.jspf" %>

<h1>logging out...</h1>

<%
cookies = request.getCookies();

//find the SoftCORE session cookie
if(cookies != null)
{
  for(i = 0; i < cookies.length; i++)
  {
    tempstr = cookies[i].getName();
    if(tempstr.compareTo("SOFTCORE_SESSION") == 0)
    {
      //extract the session ID
      sessionID = Integer.parseInt(cookies[i].getValue());

      //kill the active session
      if(a.isActive(sessionID))
      {
        access_level = 0;
        a.siteLogout(sessionID);
      }
    }
  }
}

Cookie sessionCookie = new Cookie("SOFTCORE_SESSION","-1");
sessionCookie.setMaxAge(7200);
response.addCookie(sessionCookie);

%>

<meta http-equiv=REFRESH content=0;url=index.jsp>
</body>
</html>
